/**
 * -----------------------------------------------------------------
 * 装饰器模式
 */

class Circle {
  draw() {
    console.log("Drawing")
  }
}

class Decorator {
  constructor(circle) {
    this.circle = new Circle()
  }
  draw() {
    this.circle.draw()
    this.setBorder(circle)
  }
  setBorder(circle) {
    console.log("SetingBorder")
  }
}

let circle = new Circle()
circle.draw()
console.log("-----------------")
let dec = new Decorator()
dec.draw()